capture log close
log using conjoint_analysis, replace text
//This file replicates the results reported in "Understanding Public Attitudes toward Redistribution: Analysis by Ideological Subgroups" (Qi, Public Opinion Quarterly).
//updated 10-14-24

//Program setup
version 18
clear all
set linesize 90
macro drop _all
set scheme s1mono
set more off
set level 95

use conjoint_data.dta, clear
des

//Figure 1
reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if screener_2plus==1&ideo3==1, cluster(id) 
est sto Liberal
margins i.cat_a_trans i.cat_a_distri i.cat_a_tax i.cat_a_cost, post
est sto Liberalm
reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if screener_2plus==1&ideo3==3, cluster(id)
est sto Conservative
margins i.cat_a_trans i.cat_a_distri i.cat_a_tax i.cat_a_cost, post
est sto Conservativem

coefplot (Liberalm, label(Liberal)) (Conservativem, label(Conservative)), omitted baselevels drop(_cons) keep(*:) xline(0.5, lpattern(-) lcolor(black)) xlabel(.25(.1).75) msymbol(O) msize(small) coeflabels(1.cat_a_trans = "Immediate replacement" 2.cat_a_trans = "Phasing out over years" 3.cat_a_trans = "Competition" 1.cat_a_distri = "Lower-income citizens" 2.cat_a_distri = "Lower- and middle-income citizens" 3.cat_a_distri = "All income groups" 4.cat_a_distri = "Higher- and middle-income citizens" 5.cat_a_distri = "Higher-income citizens" 1.cat_a_tax = "Higher-income households" 2.cat_a_tax = "Higher- and middle-income households" 3.cat_a_tax = "All income groups" 4.cat_a_tax = "Lower- and middle-income households" 5.cat_a_tax = "Lower-income households" 1.cat_a_cost= "$2.4 trillion" 2.cat_a_cost= "$3.2 trillion" 3.cat_a_cost= "$4.3 trillion" 4.cat_a_cost= "$6.2 trillion", labsize(small)) headings(1.cat_a_trans = "{bf:Transition from current system}" 1.cat_a_distri = "{bf:This policy benefits most for}" 1.cat_a_tax = "{bf: The main contributors to tax sources are}" 1.cat_a_cost = "{bf:Total cost per year}", nogap) subtitle(, fcolor (gs15)) scale(0.7) xtitle({bf:Marginal Means (forced choice)}) 
gr_edit .b2title.style.editstyle size(small) editcopy
gr_edit .b2title.text.Arrpush Excludes least attentive respondents 
gr export Figures/choice_ideo2_mm_2plus.png, as(png) replace

//Formal tests
*Hypothesis 1a&1b: Liberals are more likely than conservatives to support social policies with progressive distributive results. Conservatives are more likely than liberals to support social policies with regressive distributive results.
reg program_choice i.cat_a_distri##i.libcon if screener_2plus==1, cl(id)
testparm i.cat_a_distri#i.libcon /*p<.01, signed in right direction*/
di r(p) /*to show more digits*/ 

reg program_choice ib5.cat_a_distri##i.libcon if screener_2plus==1, cl(id)
testparm ib5.cat_a_tax##i.libcon /*p<.01, signed in right direction*/
di r(p) /*to show more digits*/ 

*Hypothesis 2a&2b: Liberals are more likely than conservatives to support social policies funded by progressive taxes. Conservatives are more likely than liberals to support social policies funded by regressive taxes.
reg program_choice i.cat_a_tax##i.libcon if screener_2plus==1, cl(id)
testparm i.cat_a_tax#i.libcon /*p<.01, signed in right direction*/
di r(p) /*to show more digits*/ 

reg program_choice ib5.cat_a_tax##i.libcon if screener_2plus==1, cl(id)
testparm ib5.cat_a_tax##i.libcon /*p<.01, signed in right direction*/
di r(p) /*to show more digits*/ 

*Hypothesis 3: Conservatives are more likely to support social policies with progressive distributive results/taxes than those with regressive distributive results/taxes.
codebook libcon
codebook cat_a_distri
reg program_choice ib3.cat_a_distri if screener_2plus==1 &libcon ==1, cl(id)
lincom 1.cat_a_distri-4.cat_a_distri /*p<.01, signed in right direction*/
lincom 1.cat_a_distri-5.cat_a_distri /*p<.01, signed in right direction*/
lincom 2.cat_a_distri-4.cat_a_distri /*p<.01, signed in right direction*/
lincom 2.cat_a_distri-5.cat_a_distri /*p<.01, signed in right direction*/

codebook cat_a_tax
reg program_choice ib3.cat_a_tax if screener_2plus==1 & libcon ==1, cl(id)
lincom 1.cat_a_tax-4.cat_a_tax /*p<.01, signed in right direction*/
lincom 1.cat_a_tax-5.cat_a_tax /*p<.01, signed in right direction*/
lincom 2.cat_a_tax-4.cat_a_tax /*p<.01, signed in right direction*/
lincom 2.cat_a_tax-5.cat_a_tax /*p<.01, signed in right direction*/

*Hypothesis 4a (see Appendix E): Information about social policies' progressive distributive results will have a larger positive impact on citizens' policy support than information about social policies' regressive distributive consequences.
codebook libcon
codebook cat_a_distri
reg program_choice ib3.cat_a_distri if screener_2plus==1, cl(id)
lincom 1.cat_a_distri-4.cat_a_distri /*p<.01, signed in right direction*/
lincom 1.cat_a_distri-5.cat_a_distri /*p<.01, signed in right direction*/
lincom 2.cat_a_distri-4.cat_a_distri /*p<.01, signed in right direction*/
lincom 2.cat_a_distri-5.cat_a_distri /*p<.01, signed in right direction*/

*Hypothesis 4b (see Appendix E):  Information about social policies' progressive tax sources will have a larger positive impact on citizens' policy support than information about social policies' regressive tax sources.
codebook cat_a_tax
reg program_choice ib3.cat_a_tax if screener_2plus==1, cl(id)
lincom 1.cat_a_tax-4.cat_a_tax /*p<.01, signed in right direction*/
lincom 1.cat_a_tax-5.cat_a_tax /*p<.01, signed in right direction*/
lincom 2.cat_a_tax-4.cat_a_tax /*p<.01, signed in right direction*/
lincom 2.cat_a_tax-5.cat_a_tax /*p<.01, signed in right direction*/


*****************************Supplementary Material******************************
//SM B. Descriptive Statistics of Survey Samples
use conjoint_data.dta, clear
des
codebook expand
keep if expand ==1
tabulate female
tabulate age_ordinal
tabulate white
tabulate educ_new
tabulate income3
tabulate pid_7
tabulate ideology

codebook female educ_new age_ordinal white pid_7 ideo3 income
estpost summarize female educ_new age_ordinal white pid_7 ideo3 income

//SM C.
*AMCE by ideology (with moderates)
**All respondents (Table C.1)
clear all
use conjoint_data.dta, clear
des
reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if ideo3==1, cluster(id) 
est sto Liberals_all
margins i.cat_a_trans i.cat_a_distri i.cat_a_tax i.cat_a_cost, post
est sto Liberals_all_mm

reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if ideo3==2, cluster(id) 
est sto Moderates_all
margins i.cat_a_trans i.cat_a_distri i.cat_a_tax i.cat_a_cost, post
est sto Moderates_all_mm

reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if ideo3==3, cluster(id)
est sto Conservatives_all
margins i.cat_a_trans i.cat_a_distri i.cat_a_tax i.cat_a_cost, post
est sto Conservatives_all_mm

esttab Liberals_all Moderates_all Conservatives_all using Tables/c1.txt, tab cells("b(fmt(3))" se(par(`"("' `")"') fmt(3)) p(par(`"["' `"]"') fmt(3))) onecell label  nobaselevels nomtitles eqlabels(none) star(* 0.10 ** 0.05 *** 0.01) replace

**All respondents (Figure C.1)
coefplot (Liberals_all, label(Liberal) mcolor(gs0) ciopts(color(gs0))) (Moderates_all, label(Moderate) mcolor(gs7) ciopts(color(gs7))) (Conservatives_all, label(Conservative) mcolor(gs13) ciopts(color(gs13))),  omitted baselevels drop(_cons) keep(*:) xline(0, lpattern(-) lcolor(black)) xlabel(-.3(.1).3) xtick(-.1(.1).1) msymbol(O) msize(small) coeflabels(1.cat_a_trans = "Immediate replacement" 2.cat_a_trans = "Phasing out over years" 3.cat_a_trans = "Competition" 1.cat_a_distri = "Lower-income citizens" 2.cat_a_distri = "Lower- and middle-income citizens" 3.cat_a_distri = "All income groups" 4.cat_a_distri = "Higher- and middle-income citizens" 5.cat_a_distri = "Higher-income citizens" 1.cat_a_tax = "Higher-income households" 2.cat_a_tax = "Higher- and middle-income households" 3.cat_a_tax = "All income groups" 4.cat_a_tax = "Lower- and middle-income households" 5.cat_a_tax = "Lower-income households" 1.cat_a_cost= "$2.4 trillion" 2.cat_a_cost= "$3.2 trillion" 3.cat_a_cost= "$4.3 trillion" 4.cat_a_cost= "$6.2 trillion", labsize(small)) headings(1.cat_a_trans = "{bf:Transition from current system}" 1.cat_a_distri = "{bf:This policy benefits most for}" 1.cat_a_tax = "{bf: The main contributors to tax sources are}" 1.cat_a_cost = "{bf:Total cost per year}", nogap) subtitle(, fcolor (gs15)) scale(0.7) xtitle({bf:Estimated AMCEs (forced choice)})  legend(pos(6) col(3) label(2 "Liberal") label(4 "Moderate") label(6 "Conservative")) 
gr_edit .b2title.style.editstyle size(small) editcopy
gr export Figures/choice_ideo_amce.png, as(png) replace

**Dropping least attentive respondents (Table C.2)
reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if screener_2plus==1&ideo3==1, cluster(id) 
est sto Liberals
margins i.cat_a_trans i.cat_a_distri i.cat_a_tax i.cat_a_cost, post
est sto Liberals_mm

reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if screener_2plus==1&ideo3==2, cluster(id) 
est sto Moderates
margins i.cat_a_trans i.cat_a_distri i.cat_a_tax i.cat_a_cost, post
est sto Moderates_mm

reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if screener_2plus==1&ideo3==3, cluster(id)
est sto Conservatives
margins i.cat_a_trans i.cat_a_distri i.cat_a_tax i.cat_a_cost, post
est sto Conservatives_mm

esttab Liberals Moderates Conservatives using Tables/c2.txt, tab cells("b(fmt(3))" se(par(`"("' `")"') fmt(3)) p(par(`"["' `"]"') fmt(3))) onecell label  nobaselevels nomtitles eqlabels(none) star(* 0.10 ** 0.05 *** 0.01) replace

**Dropping least attentive respondents (Figure C.2)
coefplot (Liberals, label(Liberal) mcolor(gs0) ciopts(color(gs0))) (Moderates, label(Moderate) mcolor(gs7) ciopts(color(gs7))) (Conservatives, label(Conservative) mcolor(gs13) ciopts(color(gs13))),  omitted baselevels drop(_cons) keep(*:) xline(0, lpattern(-) lcolor(black)) xlabel(-.3(.1).3) xtick(-.1(.1).1) msymbol(O) msize(small) coeflabels(1.cat_a_trans = "Immediate replacement" 2.cat_a_trans = "Phasing out over years" 3.cat_a_trans = "Competition" 1.cat_a_distri = "Lower-income citizens" 2.cat_a_distri = "Lower- and middle-income citizens" 3.cat_a_distri = "All income groups" 4.cat_a_distri = "Higher- and middle-income citizens" 5.cat_a_distri = "Higher-income citizens" 1.cat_a_tax = "Higher-income households" 2.cat_a_tax = "Higher- and middle-income households" 3.cat_a_tax = "All income groups" 4.cat_a_tax = "Lower- and middle-income households" 5.cat_a_tax = "Lower-income households" 1.cat_a_cost= "$2.4 trillion" 2.cat_a_cost= "$3.2 trillion" 3.cat_a_cost= "$4.3 trillion" 4.cat_a_cost= "$6.2 trillion", labsize(small)) headings(1.cat_a_trans = "{bf:Transition from current system}" 1.cat_a_distri = "{bf:This policy benefits most for}" 1.cat_a_tax = "{bf: The main contributors to tax sources are}" 1.cat_a_cost = "{bf:Total cost per year}", nogap) subtitle(, fcolor (gs15)) scale(0.7) xtitle({bf:Estimated AMCEs (forced choice)}) legend(pos(6) col(3) label(2 "Liberal") label(4 "Moderate") label(6 "Conservative")) 
gr_edit .b2title.style.editstyle size(small) editcopy
gr_edit .b2title.text.Arrpush Excludes least attentive respondents 
gr export Figures/choice_ideo_amce_2plus.png, as(png) replace

**Dropping least attentive respondents and with different reference categories (Table C.3)
reg program_choice i.cat_a_trans b4.cat_a_distri b4.cat_a_tax i.cat_a_cost if screener_2plus==1&ideo3==1, cluster(id) 
est sto Liberalsr

reg program_choice i.cat_a_trans b4.cat_a_distri b4.cat_a_tax i.cat_a_cost if screener_2plus==1&ideo3==2, cluster(id) 
est sto Moderatesr

reg program_choice i.cat_a_trans b4.cat_a_distri b4.cat_a_tax i.cat_a_cost if screener_2plus==1&ideo3==3, cluster(id)
est sto Conservativesr

esttab Liberalsr Moderatesr Conservativesr using Tables/c3.txt, tab cells("b(fmt(3))" se(par(`"("' `")"') fmt(3)) p(par(`"["' `"]"') fmt(3))) onecell label  nobaselevels nomtitles eqlabels(none) star(* 0.10 ** 0.05 *** 0.01) replace

**Dropping least attentive respondents (Figure C.3)
coefplot (Liberalsr, label(Liberal) mcolor(gs0) ciopts(color(gs0))) (Moderatesr, label(Moderate) mcolor(gs7) ciopts(color(gs7))) (Conservativesr, label(Conservative) mcolor(gs13) ciopts(color(gs13))),  omitted baselevels drop(_cons) keep(*:) xline(0, lpattern(-) lcolor(black)) xlabel(-.3(.1).3) xtick(-.1(.1).1) msymbol(O) msize(small) coeflabels(1.cat_a_trans = "Immediate replacement" 2.cat_a_trans = "Phasing out over years" 3.cat_a_trans = "Competition" 1.cat_a_distri = "Lower-income citizens" 2.cat_a_distri = "Lower- and middle-income citizens" 3.cat_a_distri = "All income groups" 4.cat_a_distri = "Higher- and middle-income citizens" 5.cat_a_distri = "Higher-income citizens" 1.cat_a_tax = "Higher-income households" 2.cat_a_tax = "Higher- and middle-income households" 3.cat_a_tax = "All income groups" 4.cat_a_tax = "Lower- and middle-income households" 5.cat_a_tax = "Lower-income households" 1.cat_a_cost= "$2.4 trillion" 2.cat_a_cost= "$3.2 trillion" 3.cat_a_cost= "$4.3 trillion" 4.cat_a_cost= "$6.2 trillion", labsize(small)) headings(1.cat_a_trans = "{bf:Transition from current system}" 1.cat_a_distri = "{bf:This policy benefits most for}" 1.cat_a_tax = "{bf: The main contributors to tax sources are}" 1.cat_a_cost = "{bf:Total cost per year}", nogap) subtitle(, fcolor (gs15)) scale(0.7) xtitle({bf:Estimated AMCEs (forced choice)}) legend(pos(6) col(3) label(2 "Liberal") label(4 "Moderate") label(6 "Conservative"))
gr_edit .b2title.style.editstyle size(small) editcopy
gr_edit .b2title.text.Arrpush Excludes least attentive respondents 
gr export Figures/choice_ideor_amce_2plus.png, as(png) replace

*Marginal means by ideology (with moderates)
**All respondents (Table C.4)
esttab Liberals_all_mm Moderates_all_mm Conservatives_all_mm using Tables/c4.txt, tab cells("b(fmt(3))" se(par(`"("' `")"') fmt(3)) p(par(`"["' `"]"') fmt(3))) onecell label  nobaselevels nomtitles eqlabels(none) star(* 0.10 ** 0.05 *** 0.01) replace

**All respondents (Figure C.4)
coefplot (Liberals_all_mm, label(Liberal) mcolor(gs0) ciopts(color(gs0))) (Moderates_all_mm, label(Moderate) mcolor(gs7) ciopts(color(gs7))) (Conservatives_all_mm, label(Conservative) mcolor(gs13) ciopts(color(gs13))), omitted baselevels drop(_cons) keep(*:) xline(0.5, lpattern(-) lcolor(black)) xlabel(.25(.1).75) msymbol(O) msize(small) coeflabels(1.cat_a_trans = "Immediate replacement" 2.cat_a_trans = "Phasing out over years" 3.cat_a_trans = "Competition" 1.cat_a_distri = "Lower-income citizens" 2.cat_a_distri = "Lower- and middle-income citizens" 3.cat_a_distri = "All income groups" 4.cat_a_distri = "Higher- and middle-income citizens" 5.cat_a_distri = "Higher-income citizens" 1.cat_a_tax = "Higher-income households" 2.cat_a_tax = "Higher- and middle-income households" 3.cat_a_tax = "All income groups" 4.cat_a_tax = "Lower- and middle-income households" 5.cat_a_tax = "Lower-income households" 1.cat_a_cost= "$2.4 trillion" 2.cat_a_cost= "$3.2 trillion" 3.cat_a_cost= "$4.3 trillion" 4.cat_a_cost= "$6.2 trillion", labsize(small)) headings(1.cat_a_trans = "{bf:Transition from current system}" 1.cat_a_distri = "{bf:This policy benefits most for}" 1.cat_a_tax = "{bf: The main contributors to tax sources are}" 1.cat_a_cost = "{bf:Total cost per year}", nogap) subtitle(, fcolor (gs15)) scale(0.7) xtitle({bf:Marginal Means (forced choice)}) legend(pos(6) col(3))
gr_edit .b2title.style.editstyle size(small) editcopy 
gr export Figures/choice_ideo_mm.png, as(png) replace

**Dropping least attentive respondents (Table C.5)
esttab Liberals_mm Moderates_mm Conservatives_mm using Tables/c5.txt, tab cells("b(fmt(3))" se(par(`"("' `")"') fmt(3)) p(par(`"["' `"]"') fmt(3))) onecell label  nobaselevels nomtitles eqlabels(none) star(* 0.10 ** 0.05 *** 0.01) replace

**Dropping least attentive respondents (Figure C.5)
coefplot (Liberals_mm, label(Liberal) mcolor(gs0) ciopts(color(gs0))) (Moderates_mm, label(Moderate) mcolor(gs7) ciopts(color(gs7))) (Conservatives_mm, label(Conservative) mcolor(gs13) ciopts(color(gs13))), omitted baselevels drop(_cons) keep(*:) xline(0.5, lpattern(-) lcolor(black)) xlabel(.25(.1).75) msymbol(O) msize(small) coeflabels(1.cat_a_trans = "Immediate replacement" 2.cat_a_trans = "Phasing out over years" 3.cat_a_trans = "Competition" 1.cat_a_distri = "Lower-income citizens" 2.cat_a_distri = "Lower- and middle-income citizens" 3.cat_a_distri = "All income groups" 4.cat_a_distri = "Higher- and middle-income citizens" 5.cat_a_distri = "Higher-income citizens" 1.cat_a_tax = "Higher-income households" 2.cat_a_tax = "Higher- and middle-income households" 3.cat_a_tax = "All income groups" 4.cat_a_tax = "Lower- and middle-income households" 5.cat_a_tax = "Lower-income households" 1.cat_a_cost= "$2.4 trillion" 2.cat_a_cost= "$3.2 trillion" 3.cat_a_cost= "$4.3 trillion" 4.cat_a_cost= "$6.2 trillion", labsize(small)) headings(1.cat_a_trans = "{bf:Transition from current system}" 1.cat_a_distri = "{bf:This policy benefits most for}" 1.cat_a_tax = "{bf: The main contributors to tax sources are}" 1.cat_a_cost = "{bf:Total cost per year}", nogap) subtitle(, fcolor (gs15)) scale(0.7) xtitle({bf:Marginal Means (forced choice)}) legend(pos(6) col(3))
gr_edit .b2title.style.editstyle size(small) editcopy 
gr_edit .b2title.text.Arrpush Excludes least attentive respondents 
gr export Figures/choice_ideo_mm_2plus.png, as(png) replace

*AMCE 
**All respondents (Table C.6)
reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost, cluster(id)
est sto All
margins i.cat_a_trans i.cat_a_distri i.cat_a_tax i.cat_a_cost, post
est sto All_mm

**Dropping least attentive respondents (Table C.6)
reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if screener_2plus==1, cluster(id) 
est sto All_plus
margins i.cat_a_trans i.cat_a_distri i.cat_a_tax i.cat_a_cost, post
est sto All_plus_mm

esttab All All_plus using Tables/c6.txt, tab cells("b(fmt(3))" se(par(`"("' `")"') fmt(3)) p(par(`"["' `"]"') fmt(3))) onecell label  nobaselevels nomtitles eqlabels(none) star(* 0.10 ** 0.05 *** 0.01) replace

**All respondents (Figure C.6)
coefplot All, omitted baselevels drop(_cons) keep(*:) xline(0, lpattern(-) lcolor(black)) xlabel(-.3(.1).3) xtick(-.1(.1).1) coeflabels(1.cat_a_trans = "Immediate replacement" 2.cat_a_trans = "Phasing out over years" 3.cat_a_trans = "Competition" 1.cat_a_distri = "Lower-income citizens" 2.cat_a_distri = "Lower- and middle-income citizens" 3.cat_a_distri = "All income groups" 4.cat_a_distri = "Higher- and middle-income citizens" 5.cat_a_distri = "Higher-income citizens" 1.cat_a_tax = "Higher-income households" 2.cat_a_tax = "Higher- and middle-income households" 3.cat_a_tax = "All income groups" 4.cat_a_tax = "Lower- and middle-income households" 5.cat_a_tax = "Lower-income households" 1.cat_a_cost= "$2.4 trillion" 2.cat_a_cost= "$3.2 trillion" 3.cat_a_cost= "$4.3 trillion" 4.cat_a_cost= "$6.2 trillion", labsize(small)) headings(1.cat_a_trans = "{bf:Transition from current system}" 1.cat_a_distri = "{bf:This policy benefits most for}" 1.cat_a_tax = "{bf: The main contributors to tax sources are}" 1.cat_a_cost = "{bf:Total cost per year}", nogap)subtitle(, fcolor (gs15)) scale(0.7) xtitle({bf:Estimated AMCEs (forced choice)}) 
gr_edit .b2title.style.editstyle size(small) editcopy
gr export Figures/choice_overall_amce.png, as(png) replace

**Dropping least attentive respondents (Figure C.7)
coefplot All_plus, omitted baselevels drop(_cons) keep(*:) xline(0, lpattern(-) lcolor(black)) xlabel(-.3(.1).3) xtick(-.1(.1).1) coeflabels(1.cat_a_trans = "Immediate replacement" 2.cat_a_trans = "Phasing out over years" 3.cat_a_trans = "Competition" 1.cat_a_distri = "Lower-income citizens" 2.cat_a_distri = "Lower- and middle-income citizens" 3.cat_a_distri = "All income groups" 4.cat_a_distri = "Higher- and middle-income citizens" 5.cat_a_distri = "Higher-income citizens" 1.cat_a_tax = "Higher-income households" 2.cat_a_tax = "Higher- and middle-income households" 3.cat_a_tax = "All income groups" 4.cat_a_tax = "Lower- and middle-income households" 5.cat_a_tax = "Lower-income households" 1.cat_a_cost= "$2.4 trillion" 2.cat_a_cost= "$3.2 trillion" 3.cat_a_cost= "$4.3 trillion" 4.cat_a_cost= "$6.2 trillion", labsize(small)) headings(1.cat_a_trans = "{bf:Transition from current system}" 1.cat_a_distri = "{bf:This policy benefits most for}" 1.cat_a_tax = "{bf: The main contributors to tax sources are}" 1.cat_a_cost = "{bf:Total cost per year}", nogap)subtitle(, fcolor (gs15)) scale(0.7) xtitle({bf:Estimated AMCEs (forced choice)}) 
gr_edit .b2title.style.editstyle size(small) editcopy
gr_edit .b2title.text.Arrpush Excludes least attentive respondents
gr export Figures/choice_overall_amce_2plus.png, as(png) replace

*Marginal means 
**All respondents and dropping least attentive respondents (Table C.7)
esttab All_mm All_plus_mm using Tables/c7.txt, tab cells("b(fmt(3))" se(par(`"("' `")"') fmt(3)) p(par(`"["' `"]"') fmt(3))) onecell label  nobaselevels nomtitles eqlabels(none) star(* 0.10 ** 0.05 *** 0.01) replace

**All respondents (Figure C.8)
coefplot All_mm, omitted baselevels drop(_cons) keep(*:) xline(0.5, lpattern(-) lcolor(black)) xlabel(.25(.1).75) msymbol(O) msize(small) coeflabels(1.cat_a_trans = "Immediate replacement" 2.cat_a_trans = "Phasing out over years" 3.cat_a_trans = "Competition" 1.cat_a_distri = "Lower-income citizens" 2.cat_a_distri = "Lower- and middle-income citizens" 3.cat_a_distri = "All income groups" 4.cat_a_distri = "Higher- and middle-income citizens" 5.cat_a_distri = "Higher-income citizens" 1.cat_a_tax = "Higher-income households" 2.cat_a_tax = "Higher- and middle-income households" 3.cat_a_tax = "All income groups" 4.cat_a_tax = "Lower- and middle-income households" 5.cat_a_tax = "Lower-income households" 1.cat_a_cost= "$2.4 trillion" 2.cat_a_cost= "$3.2 trillion" 3.cat_a_cost= "$4.3 trillion" 4.cat_a_cost= "$6.2 trillion", labsize(small)) headings(1.cat_a_trans = "{bf:Transition from current system}" 1.cat_a_distri = "{bf:This policy benefits most for}" 1.cat_a_tax = "{bf: The main contributors to tax sources are}" 1.cat_a_cost = "{bf:Total cost per year}", nogap) subtitle(, fcolor (gs15)) scale(0.7) xtitle({bf:Marginal Means (forced choice)})
gr_edit .b2title.style.editstyle size(small) editcopy
gr export Figures/choice_overall_mm.png, as(png) replace

**Dropping least attentive respondents (Figure C.9)
coefplot All_plus_mm, omitted baselevels drop(_cons) keep(*:) xline(0.5, lpattern(-) lcolor(black)) xlabel(.25(.1).75) msymbol(O) msize(small) coeflabels(1.cat_a_trans = "Immediate replacement" 2.cat_a_trans = "Phasing out over years" 3.cat_a_trans = "Competition" 1.cat_a_distri = "Lower-income citizens" 2.cat_a_distri = "Lower- and middle-income citizens" 3.cat_a_distri = "All income groups" 4.cat_a_distri = "Higher- and middle-income citizens" 5.cat_a_distri = "Higher-income citizens" 1.cat_a_tax = "Higher-income households" 2.cat_a_tax = "Higher- and middle-income households" 3.cat_a_tax = "All income groups" 4.cat_a_tax = "Lower- and middle-income households" 5.cat_a_tax = "Lower-income households" 1.cat_a_cost= "$2.4 trillion" 2.cat_a_cost= "$3.2 trillion" 3.cat_a_cost= "$4.3 trillion" 4.cat_a_cost= "$6.2 trillion", labsize(small)) headings(1.cat_a_trans = "{bf:Transition from current system}" 1.cat_a_distri = "{bf:This policy benefits most for}" 1.cat_a_tax = "{bf: The main contributors to tax sources are}" 1.cat_a_cost = "{bf:Total cost per year}", nogap) subtitle(, fcolor (gs15)) scale(0.7) xtitle({bf:Marginal Means (forced choice)})
gr_edit .b2title.style.editstyle size(small) editcopy
gr_edit .b2title.text.Arrpush Excludes least attentive respondents
gr export Figures/choice_overall_mm_2plus.png, as(png) replace

*Interaction analyses
**Distribution results * Tax sources (Table C.8)
reg program_choice ib3.cat_a_distri##ib3.cat_a_tax i.cat_a_trans i.cat_a_cost if screener_2plus==1&ideo3==1, cluster(id) 
est sto inter_ldrts

reg program_choice ib3.cat_a_distri##ib3.cat_a_tax i.cat_a_trans i.cat_a_cost if screener_2plus==1&ideo3==3, cluster(id) 
est sto inter_cdrts

esttab inter_ldrts inter_cdrts using Tables/c8.txt, tab cells("b(fmt(3))" se(par(`"("' `")"') fmt(3)) p(par(`"["' `"]"') fmt(3))) r2 onecell label  nobaselevels nomtitles eqlabels(none) star(* 0.10 ** 0.05 *** 0.01) replace

**Distribution results * Cost (Table C.9)
reg program_choice ib3.cat_a_distri##i.cat_a_cost b3.cat_a_tax i.cat_a_trans if screener_2plus==1&ideo3==1, cluster(id) 
est sto inter_ldrc

reg program_choice ib3.cat_a_distri##i.cat_a_cost b3.cat_a_tax i.cat_a_trans if screener_2plus==1&ideo3==3, cluster(id) 
est sto inter_cdrc 

esttab inter_ldrc inter_cdrc using Tables/c9.txt, tab cells("b(fmt(3))" se(par(`"("' `")"') fmt(3)) p(par(`"["' `"]"') fmt(3))) r2 onecell label  nobaselevels nomtitles eqlabels(none) star(* 0.10 ** 0.05 *** 0.01) replace

*Differences across rounds
**Conditional ACMEs
reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if screener_2plus==1 & (expand == 1| expand ==2), cluster(id)
est sto round1

reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if screener_2plus==1 & (expand == 3| expand ==4), cluster(id)
est sto round2

reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if screener_2plus==1 & (expand == 5| expand ==6), cluster(id)
est sto round3

reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if screener_2plus==1 & (expand == 7| expand ==8), cluster(id)
est sto round4

reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if screener_2plus==1 & (expand == 9| expand ==10), cluster(id)
est sto round5

reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if screener_2plus==1 & (expand == 11| expand ==12), cluster(id)
est sto round6

reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if screener_2plus==1 & (expand == 13| expand ==14), cluster(id)
est sto round7

reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if screener_2plus==1 & (expand == 15| expand ==16), cluster(id)
est sto round8

reg program_choice i.cat_a_trans b3.cat_a_distri b3.cat_a_tax i.cat_a_cost if screener_2plus==1 & (expand == 17| expand ==18), cluster(id)
est sto round9

**Making coefplot (Figure C.10)
coefplot round1, bylabel(R1)|| round2, bylabel(R2)|| round3, bylabel(R3)|| round4, bylabel(R4)|| round5, bylabel(R5)|| round6, bylabel(R6)|| round7, bylabel(R7)|| round8, bylabel(R8)|| round9, bylabel(R9)||, drop(_cons *.cat_a_trans *.cat_a_cost) keep(*:) omitted baselevels  xline(0, lpattern(-) lcolor(black)) xlabel(-.3(.3).3) coeflabels(1.cat_a_distri = "Lower-income citizens" 2.cat_a_distri = "Lower- and middle-income citizens" 3.cat_a_distri = "All income groups" 4.cat_a_distri = "Higher- and middle-income citizens" 5.cat_a_distri = "Higher-income citizens" 1.cat_a_tax = "Higher-income households" 2.cat_a_tax = "Higher- and middle-income households" 3.cat_a_tax = "All income groups" 4.cat_a_tax = "Lower- and middle-income households" 5.cat_a_tax = "Lower-income households", labsize(vsmall)) headings(1.cat_a_distri = "{bf:This policy benefits most for}" 1.cat_a_tax = "{bf: The main contributors to tax sources are}", nogap)subtitle(, fcolor (gs15)) scale(0.7) xtitle({bf:Estimated AMCEs (forced choice)}) byopts(compact cols(3))
gr_edit .b2title.style.editstyle size(small) editcopy
gr_edit .b2title.text.Arrpush Excludes least attentive respondents
gr export Figures/choice_amce_2plus_round.png, as(png) replace

log close
exit


